package com.blueocean_health.care.management.domain.dto;

import java.math.BigDecimal;

import com.alibaba.fastjson.annotation.JSONType;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.blueocean_health.care.management.common.base.string.StringUtils;

@JSONType(serialzeFeatures = SerializerFeature.WriteNullNumberAsZero)//把结尾数字为.0的去掉
public class OrderInfoPriceRespDto {
	
	private Double oneDayPrice =0.0;//费用
	private Double hourPrice =0.0;
	private Double oneDayPay =0.0;//工资
	private Double hourPay =0.0;
	private String headNurse;
	
	public String getHeadNurse() {
		return headNurse;
	}
	public void setHeadNurse(String headNurse) {
		this.headNurse = headNurse;
	}
	public OrderInfoPriceRespDto() {
	}
//	public OrderInfoPriceRespDto(PriceDto priceDto) {
//		this.oneDayPrice = priceDto.getOneDayPay().doubleValue();
//		this.hourPrice = priceDto.getOneHourPay().doubleValue();
//		this.oneDayPay = priceDto.getNurseDayPay().doubleValue();
//		this.hourPay = priceDto.getNurseHourPay().doubleValue();
//	}
	public Double getOneDayPrice() {
		return doubleFormat(StringUtils.isEmpty(oneDayPrice)?0.0:oneDayPrice);
	}
	public void setOneDayPrice(Double oneDayPrice) {
		this.oneDayPrice = oneDayPrice;
	}
	public Double getHourPrice() {
		return doubleFormat(StringUtils.isEmpty(hourPrice)?0.0:hourPrice);
	}
	public void setHourPrice(Double hourPrice) {
		this.hourPrice = hourPrice;
	}
	public Double getOneDayPay() {
		return doubleFormat(StringUtils.isEmpty(oneDayPay)?0.0:oneDayPay);
	}
	public void setOneDayPay(Double oneDayPay) {
		this.oneDayPay = oneDayPay;
	}
	public Double getHourPay() {
		return doubleFormat(StringUtils.isEmpty(hourPay)?0.0:hourPay);
	}
	public void setHourPay(Double hourPay) {
		this.hourPay = hourPay;
	}
	
	
	public OrderInfoPriceRespDto(String headNurse) {
		super();
		this.headNurse = headNurse;
	}
	private static double doubleFormat(double num){
		return new BigDecimal(num).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
	}
	
	
}
